import java.util.Scanner;

public class ControlTest3 {
    public static void outputNumbersOneToFive(String[] args) {
        for (int i = 1; i<= 5; i++)
            System.out.println(i);
    }

    public static void outMaxFigureInNumbers(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Math.abs(sc.nextInt()), i, temp=0;
        int length = (Integer.toString(number)).length();
        for (i=1; i<=length; i++) {

            if (number % 10 > temp) temp = number % 10;
            number/=10;
        }
        System.out.println(temp);
    }

    public static void outputOddNumbersFromRange(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt(), n2 = sc.nextInt(), i, x;
        String str = "";
        if (n1 > n2){x=n1; n1=n2; n2=x;}

        for (i=n1; i<=n2; i++) {
            if (i % 2 != 0) str+=i + " ";
        }
        System.out.println(str);

    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt(), i;
        String str = "";
        for (i=1; i<=num;i++){
            if (num % i == 0) {str += i + " ";}
        }
        System.out.println(str);
    }

    public static void checkEasyNumber(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt(), i, result=0;
        for (i=1; i<=num; i++) {
            if (num % i == 0 && num != 1) result+=1;
            if (result > 2) break;
        }
        System.out.printf(result==2 ? "true":"false");
    }
}
